import request from "@/utils/request";

export function getClassifyList(params) {
    return request({
        url: "/category/page",
        method: "get",
        params
    });
}

export function queryClassifyById(id) {
    return request({
        url: `/category/${id}`,
        method: 'get'
    })
}

export function deleClassify(id) {
    return request({
        url: '/category',
        method: 'delete',
        params: { id }
    })
}

export function editClassify(data) {
    return request({
        url: '/category',
        method: 'put',
        data
    })
}

export function addClassify(data) {
    return request({
        url: '/category',
        method: 'post',
        data
    })
}